//
//  HRUIView+extension.swift
//  weiBo
//
//  Created by helong on 16/7/14.
//  Copyright © 2016年 helong. All rights reserved.
//

import UIKit
// MARK: - UIview的分类
extension UIView {

    //  一下属性是计算属性,分类里面不能定义存储属性
    var x: CGFloat {
        set{
            frame.origin.x = newValue
        }get{
          return frame.origin.x
}
    }
    
    var y: CGFloat {
        set {
            frame.origin.y = newValue
        }get {
            return frame.origin.y
}
    }

    var width: CGFloat{
        set {
            frame.size.width = newValue
        }get {
            return frame.size.width
        }

    }

    var height: CGFloat{
        set {
            frame.size.height = newValue
        }get {
            return frame.size.height
        }
        
    }
}
